﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.Mvc;
using System.ComponentModel;

namespace JinianNet.JNCms.Models
{
    public class Article
    {
        private int _id = 0;
        private string _title = string.Empty;
        private string _keywords = string.Empty;
        private string _description = string.Empty;
        private string _tag = string.Empty;
        private string _content = string.Empty;
        private int _channelid = 0;
        private string _channelname = string.Empty;
        private string _keyname = string.Empty;
        private string _template = string.Empty;
        private DateTime _createtime = DateTime.Now;
        private DateTime _edittime = DateTime.Now;
        private string _source = string.Empty;
        private string _author = string.Empty;
        private string _editor = string.Empty;
        private string _url = string.Empty;
        private int _click = 0;
        private bool _isneedpassword = false;
        private bool _islock = false;
        private bool _verify = true;
        private int _userid = 0;
        private bool _isurl = false;
        private bool _istop = false;
        private string _password = string.Empty;
        private bool _isimg = false;
        private string _src = string.Empty;

        /// <summary>
        /// 主键
        /// </summary>
        public int ID
        {
            set { _id = value; }
            get { return _id; }
        }
        /// <summary>
        /// 标题
        /// </summary>
        public string Title
        {
            set { _title = value; }
            get { return _title; }
        }
        /// <summary>
        /// 关键词
        /// </summary>
        public string KeyWords
        {
            set { _keywords = value; }
            get { return _keywords; }
        }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description
        {
            set { _description = value; }
            get { return _description; }
        }
        /// <summary>
        /// 标签
        /// </summary>
        public string Tag
        {
            set { _tag = value; }
            get { return _tag; }
        }
        /// <summary>
        /// 内容
        /// </summary>
        public string Content
        {
            set { _content = value; }
            get { return _content; }
        }
        /// <summary>
        /// 栏目
        /// </summary>
        public int ChannelID
        {
            set { _channelid = value; }
            get { return _channelid; }
        }
        /// <summary>
        /// 栏目名称
        /// </summary>
        public string ChannelName
        {
            set { _channelname = value; }
            get { return _channelname; }
        }
        /// <summary>
        /// 名称
        /// </summary>
        public string KeyName
        {
            set { _keyname = value; }
            get { return _keyname; }
        }
        /// <summary>
        /// 模板
        /// </summary>
        public string TempLate
        {
            set {
                if (value != null)
                {
                    _template = value.Trim();
                }
            }
            get { return _template; }
        }
        /// <summary>
        /// 发布时间
        /// </summary>
        public DateTime CreateTime
        {
            set { _createtime = value; }
            get { return _createtime; }
        }
        /// <summary>
        /// 编辑时间
        /// </summary>
        public DateTime EditTime
        {
            set { _edittime = value; }
            get { return _edittime; }
        }
        /// <summary>
        /// 来源
        /// </summary>
        public string Source
        {
            set { _source = value; }
            get { return _source; }
        }
        /// <summary>
        /// 作者
        /// </summary>
        public string Author
        {
            set { _author = value; }
            get { return _author; }
        }
        /// <summary>
        /// 编辑
        /// </summary>
        public string Editor
        {
            set { _editor = value; }
            get { return _editor; }
        }
        /// <summary>
        /// 外链
        /// </summary>
        public string Url
        {
            set { _url = value; }
            get { return _url; }
        }
        /// <summary>
        /// 点击
        /// </summary>
        public int Click
        {
            set { _click = value; }
            get { return _click; }
        }
        /// <summary>
        /// 是否需要密码
        /// </summary>
        public bool IsNeedPassword
        {
            set { _isneedpassword = value; }
            get { return _isneedpassword; }
        }
        /// <summary>
        /// 是否锁定
        /// </summary>
        public bool IsLock
        {
            set { _islock = value; }
            get { return _islock; }
        }
        /// <summary>
        /// 是否有效
        /// </summary>
        public bool IsVerify
        {
            set { _verify = value; }
            get { return _verify; }
        }
        /// <summary>
        /// 用户ID
        /// </summary>
        public int UserID
        {
            set { _userid = value; }
            get { return _userid; }
        }
        /// <summary>
        /// 是否外链
        /// </summary>
        public bool IsUrl
        {
            set { _isurl = value; }
            get { return _isurl; }
        }
        /// <summary>
        /// 是否置顶
        /// </summary>
        public bool IsTop
        {
            set { _istop = value; }
            get { return _istop; }
        }
        /// <summary>
        /// 密码
        /// </summary>
        public string Password
        {
            set { _password = value; }
            get { return _password; }
        }

        /// <summary>
        /// 是否图片文章
        /// </summary>
        public bool IsImg
        {
            set { _isimg = value; }
            get { return _isimg; }
        }

        /// <summary>
        /// 图片连接
        /// </summary>
        public string Src
        {
            set { _src = value; }
            get { return _src; }
        }
    }
}
